From dfbb4b1b2531601ab743e8c1b2b0df908cd932d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Fri, 15 Feb 2008 21:24:13 +0000 Subject: [PATCH] cleaned up win32 detection vs plug-in compilation specifics, added * configure.ac: cleaned up win32 detection vs plug-in compilation specifics, added DYNAMICLIB paramter for gcc which defaults to -shared for win32 and -dynamiclib for darwin. * extensions/Makefile.am: use $(DYNAMICLIB) instead of -shared. svn path=/trunk/; revision=278 --- ChangeLog | 7 +++++++ configure.ac | 45 ++++++++++++++++++++++++++++-------------- extensions/Makefile.am | 2 +- 3 files changed, 38 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ba1b87..c6e5a66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-02-15 Øyvind Kolås + + * configure.ac: cleaned up win32 detection vs plug-in compilation + specifics, added DYNAMICLIB paramter for gcc which defaults to -shared + for win32 and -dynamiclib for darwin. + * extensions/Makefile.am: use $(DYNAMICLIB) instead of -shared. + 2008-02-11 Kevin Cozens * configure.ac: Set shrext to ".dylib" for Darwin (ie. Mac OS). diff --git a/configure.ac b/configure.ac index 3c1ed86..2dbbb9b 100644 --- a/configure.ac +++ b/configure.ac @@ -155,23 +155,47 @@ case "$target_or_host" in esac +#################################################### +# Check how to generate plug-ins (with gcc at least) +#################################################### + +AC_MSG_CHECKING([for some Win32 platform]) +case "$target_or_host" in + *-*-darwin*) # darwin + shrext=.dylib + dynamiclib=-dynamiclib + ;; + *-*-mingw* | *-*-cygwin*) # windows + shrext=.dll + dynamiclib=-shared + ;; + *) # linux (and BSD?) + dynamiclib=-shared + shrext=.so + ;; +esac + +SHREXT=$shrext +AC_SUBST(SHREXT) +AC_DEFINE_UNQUOTED(SHREXT, "$shrext", [File extension for shared libraries]) + +DYNAMICLIB=$dynamiclib +AC_SUBST(DYNAMICLIB) +AC_DEFINE_UNQUOTED(DYNAMICLIB, "$dynamiclib", [Dynamic shared library]) + +dnl =========================================================================== + ################# # Check for Win32 ################# AC_MSG_CHECKING([for some Win32 platform]) case "$target_or_host" in - *-*-darwin*) - platform_win32=no - shrext=.dylib - ;; *-*-mingw* | *-*-cygwin*) platform_win32=yes - shrext=.dll ;; *) platform_win32=no - shrext=.so ;; esac AC_MSG_RESULT([$platform_win32]) @@ -214,15 +238,6 @@ AC_DEFINE_UNQUOTED(BABL_DIR_SEPARATOR, "$DIR_SEP", [separator between directorie AC_DEFINE_UNQUOTED(BABL_LIBRARY, "$PACKAGE_NAME-$BABL_API_VERSION", [name of BABL library]) -##################################### -# File extension for shared libraries -##################################### - -SHREXT=$shrext -AC_SUBST(SHREXT) -AC_DEFINE_UNQUOTED(SHREXT, "$shrext", [File extension for shared libraries]) - -dnl =========================================================================== dnl =========================================================================== diff --git a/extensions/Makefile.am b/extensions/Makefile.am index e546d7e..ca995f0 100644 --- a/extensions/Makefile.am +++ b/extensions/Makefile.am @@ -19,7 +19,7 @@ CFLAGS += \ -I $(top_srcdir)/extensions \ -fPIC -LDFLAGS += -shared +LDFLAGS += $(DYNAMICLIB) if OS_WIN32 LDADD = $(no-undefined) $(libbabldlla) $(MATH_LIB) -- 2.30.2